load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "ring",
    srcs = ["ring_buffer.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/ring",
    visibility = ["//visibility:public"],
)

go_test(
    name = "ring_test",
    size = "small",
    srcs = [
        "main_test.go",
        "ring_buffer_test.go",
    ],
    embed = [":ring"],
    deps = [
        "//pkg/util/leaktest",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//require",
    ],
)
